void publishMsg(String topic,String msg) {
  String tcpTemp="";
  tcpTemp = "cmd=2&uid=" + UID + "&topic=" + topic + "&msg=" + msg + "\r\n";
  sendtoTCPServer(tcpTemp);
  tcpTemp="";
  Serial.println("A message has been published");
}